using UnityEngine;

public abstract class ShapeBehavior 
#if UNITY_EDITOR//条件编译
: ScriptableObject
#endif
{
    public abstract void GameUpdate( Shape shape);

    public abstract void Save(GameDataWriter writer);

    public abstract void Load(GameDataReader reader);

    public abstract ShapeBehaviorType BehaviorType{get;}

    public abstract void Recycle();//回收

    #if UNITY_EDITOR
        public bool IsReclaimed{get;set;}

        void OnEnable()
        {
            if(IsReclaimed)
                Recycle();
        }
    #endif
}